<?php
	require_once('../inc/fen_fns.php');
	sec_session_start();
	
	
	
	if (login_check($mysqli, '>', '10') == true) {

		$email = $_POST['email'];
		
		$username = $_SESSION['username'];
		

		$query = $_DB->Query("update fen_members set
						email = '$email',
						modified_by = '".$_SESSION['username']."',
						date_modified = DATE_ADD(CURRENT_TIMESTAMP, INTERVAL 3 HOUR)
						WHERE
						id = '".$_SESSION['user_id']."'
						");
				
		header('Location: ../updateaccinfo.php?ok=1');
	

	} else {
		header('Location: ./index.php?error=2');
	}

?>	